package model_zh_kernel

import (
	"fmt"

	"zhonghui/console/warehouse/modelx/model_common"
)

type ConsolePermissions struct {
	ID       uint   `gorm:"column:id" json:"id"`               // 暂无注释
	Entity   string `gorm:"column:entity" json:"entity"`       // 授权的实体 manager或group
	EntityID uint   `gorm:"column:entity_id" json:"entity_id"` // 授权的实体id
	PolicyID uint   `gorm:"column:policy_id" json:"policy_id"` // 权限id

	model_common.CommonCreated // 时间字段
}

func (ConsolePermissions) TableName() string {
	return fmt.Sprintf("%s.console_permissions", DbName)
}
